package com.duxd.springsecurityfinal.springsecurityfinal.mvc.controller;

import com.duxd.springsecurityfinal.springsecurityfinal.pojo.User;
import com.duxd.springsecurityfinal.springsecurityfinal.response.Response;
import com.duxd.springsecurityfinal.springsecurityfinal.response.ResponseBuild;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author dong
 * @date 2022/1/16 0016
 */
@RestController
@RequestMapping(value = "/admin")
public class AdminController {

    @GetMapping(value = "/all", produces = {"application/json;charset=UTF-8"})
    public Response<List<User>> findAll(){
        return ResponseBuild.request_success.data(User.buildList("li si", "zhang san"));
    }
}
